home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2001 / MacHack 2001.toast / pc / The Hacks / pseudoDoc / headerDoc.pl < prev    next >
Encoding:
Perl Script  |  2001-06-23  |  1.1 KB  |  42 lines

  1. #!/usr/bin/perl -w
  2. #
  3. # Script name: headerDoc
  4. # Synopsis: Master script to run headerDoc2HTML and gatherHeaderDoc.
  5. #
  6. # Author: Matt Morse (matt@apple.com)
  7. # Last Updated: $Date: $
  8. #
  9. #####################################################################
  10. use Cwd;
  11. use Getopt::Std;
  12. use File::Find;
  13.  
  14. print "\n\nheaderDoc.pl\n";
  15.  
  16. my %options = ();
  17. my $scriptDir = cwd();
  18. my $specifiedOutputDir;
  19. my $bastardizationMode='';
  20.  
  21. &getopts("dvb:o:", \%options);
  22. if ($options{o}) {
  23.     $specifiedOutputDir = $options{o};
  24. }
  25.     
  26. if ($options{b}) {
  27.     $bastardizationMode = $options{b};
  28. }
  29.  
  30. my $inputDir = $ARGV[0];
  31.  
  32. my @headerDocArgs = ("$scriptDir/headerDoc2HTML.pl", "-o", "$specifiedOutputDir", "$inputDir");
  33. system(@headerDocArgs) == 0 or die "system @headerDocArgs failed: $?";
  34.  
  35. my @gatherDocArgs = ("$scriptDir/gatherHeaderDoc.pl", "$specifiedOutputDir");
  36. system(@gatherDocArgs) == 0 or die "system @gatherDocArgs failed: $?";
  37.  
  38. if (length($bastardizationMode)) {
  39.     my @pseudoDocArgs = ("$scriptDir/pseudoDoc.pl", "-b", "$bastardizationMode", "$specifiedOutputDir");
  40.     system(@pseudoDocArgs) == 0 or die "system @gatherDocArgs failed: $?";
  41. }
  42. exit 0;